home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / batch / WHEN12.ARJ / WHENISIT.DOC < prev    next >
Text File  |  1992-05-01  |  13KB  |  367 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.         
  8.                             
  9.                             
  10.                             
  11.                             
  12.                             
  13.                             
  14.                             
  15.                             
  16.                             
  17.                             
  18.                             
  19.                             
  20.                             
  21.                             
  22.                             
  23.                             
  24.                             STEENBURGH'S STUFF
  25.                           Mildly Useful Utilities
  26.                               For Batch Files
  27.                                 Version 2.0
  28.           Copyright 1991,1992 by Chuck Steenburgh and Tay-Jee Software
  29.         
  30.                             _______
  31.                        ____|__     |               (TM)
  32.                     --|       |    |-------------------
  33.                       |   ____|__  |  Association of
  34.                       |  |       |_|  Shareware
  35.                       |__|   o   |    Professionals
  36.                     -----|   |   |---------------------
  37.                          |___|___|    MEMBER
  38.         
  39.         
  40.         
  41.         
  42.         
  43.         
  44.         
  45.         
  46.         
  47.         
  48.         
  49.         
  50.         
  51.         
  52.         
  53.         
  54.         
  55.         
  56.         
  57.         
  58.         
  59.         
  60.         
  61.  
  62.                                      Page 1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.         WHENISIT 1.2                                                    |
  69.         Copyright 1991 by Chuck Steenburgh
  70.         
  71.            WHENISIT is a highly flexible utility to provide control in
  72.         DOS batch files based on time and date.  With its many op-
  73.         tions, WHENISIT will allow your batch files to determine the
  74.         year, month, date, day of the week, hour, minute, second, or
  75.         whether it is morning or afternoon and make intelligent de-
  76.         cisions based on this information.  WHENISIT is also able to
  77.         perform actions once a day (such as at the first boot-up of the
  78.         day).
  79.         
  80.            For example, you may want certain actions performed at
  81.         boot time on certain days of the week or month.  Adding
  82.         WHENISIT to your AUTOEXEC.BAT file can allow you to make
  83.         these sort of decisions. (Or allow your computer to make them
  84.         for you automatically.)
  85.         
  86.         Usage:
  87.         
  88.                      WHENISIT [option]
  89.                   
  90.                   where [option] is one of the following:
  91.                   
  92.                   /?              Displays help screen
  93.                      
  94.                   /a              Returns errorlevel based on am or pm.
  95.                   
  96.                   /d              Returns errorlevel equal to date.
  97.                   
  98.                   /h              Returns errorlevel equal to the hour
  99.                                   (24-hour clock).
  100.                               
  101.                   /m              Returns errorlevel equal to month.
  102.                   
  103.                   /mi             Returns errorlevel equal to minute.
  104.                   
  105.                   /s              Returns errorlevel equal to second.
  106.                   
  107.                   /w              Returns errorlevel based on the day
  108.                                   of the week.
  109.                                   
  110.                   /y              Returns errorlevel equal to the last
  111.                                   two digits of the year.
  112.                   
  113.                   hh:mm           24-hour time.                         |
  114.                   
  115.                   mm/dd/yy        Date.                                 |
  116.         
  117.            Entering the time in the form hh:mm will check to see if     |
  118.         the current time is equal to, before, or after the time entered.|
  119.         If the current time is later than the time entered, an error-   |
  120.         level of 2 is returned.  If the current time is entered, an     |
  121.         errorlevel of 1 is returned.  If the time entered is later than |
  122.  
  123.                                      Page 2
  124.  
  125.  
  126.  
  127.  
  128.  
  129.         the current time, an errorlevel of 0 is returned.  Entering the |
  130.         date in the form mm/dd/yy will check the current date against   |
  131.         the value entered, and return an errorlevel as described above. |
  132.                                   
  133.            Entering WHENISIT alone on the command line will generate an
  134.         errorlevel of 1 if WHENISIT has not been executed yet that day.
  135.         Otherwise, an errorlevel of 0 will be returned.  Note that if
  136.         you maintain multiple copies of WHENISIT.EXE on your system,
  137.         each copy of WHENISIT will keep track of whether or not it has
  138.         run separately from any other copies.  Be sure you know which
  139.         copy you are executing!  This is useful to put in AUTOEXEC.BAT
  140.         to indicate actions you want performed only ONCE each day, no
  141.         matter how many times you re-boot your computer.  (Once-a-day
  142.         mode)
  143.         
  144.         Examples:
  145.         
  146.              WHENISIT /a          Returns errorlevel of 2 if it is pm,
  147.                                   or 1 if it is am.
  148.                                   
  149.              WHENISIT /y          If your clock is set to the year
  150.                                   1991, returns an errorlevel of 91.
  151.                                   
  152.              WHENISIT /w          If your clock indicates that it is
  153.                                   Tuesday, returns an errorlevel of 3.
  154.              
  155.              WHENISIT 12/25/91    If current date is AFTER 12/25/91,    |
  156.                                   returns errorlevel of 2.  If current  |
  157.                                   date is 12/25/91, returns errorlevel  |
  158.                                   of 1.  If current date is earlier     |
  159.                                   than 12/25/91, errorlevel of 0 is     |
  160.                                   returned.                             |
  161.              
  162.              WHENISIT             Returns errorlevel of 0 if WHENISIT
  163.                                   has already executed, 1 if not.
  164.                                   
  165.         Errorlevel Chart:
  166.         
  167.              Errorlevel  Switch:  /a            /m            /d
  168.              ----------         --------------------------------------
  169.                  1                AM        January         Sunday
  170.                  2                PM        February        Monday
  171.                  3                na        March           Tuesday
  172.                  4                na        April           Wednesday
  173.                  5                na        May             Thursday
  174.                  6                na        June            Friday
  175.                  7                na        July            Saturday
  176.                  8                na        August             na
  177.                  9                na        September          na
  178.                 10                na        October            na
  179.                 11                na        November           na
  180.                 12                na        December           na
  181.                 
  182.            The errorlevels returned through the use of other switches
  183.  
  184.                                      Page 3
  185.  
  186.  
  187.  
  188.  
  189.  
  190.         should be self-explanatory.
  191.         
  192.            The following errorlevel values indicate a syntax error:     |
  193.            
  194.            Errorlevel          Error                                    |
  195.            ==========          =====                                    |
  196.            
  197.               250              Invalid day (within entered date)        |
  198.               251              Invalid month (within entered date)      |
  199.               252              Invalid year (within entered date)       |
  200.               253              Invalid minute (within entered time)     |
  201.               254              Invalid hour (within entered time)       |
  202.               255              Too many arguments on command line       |
  203.         
  204.         
  205.         OMBUDSMAN
  206.         
  207.           This program is produced by a member of the Association of
  208.         Shareware Professionals (ASP).  ASP wants to make sure that
  209.         the shareware principle works for you.  If you are unable to
  210.         resolve a shareware-related problem with an ASP member by
  211.         contacting the member directly, ASP may be able to help.  The
  212.         ASP Ombudsman can help you resolve a dispute or problem with
  213.         an ASP member, but does not provide technical support for 
  214.         members' products.  Please write to the ASP Ombudsman at 545
  215.         Grover Road, Muskegon, MI 49442 or send a CompuServe message
  216.         via CompuServe Mail to ASP Ombudsman, 70007,3536.
  217.         
  218.         
  219.         DISCLAIMER
  220.         
  221.            The programs described in this documentation are guaran-
  222.         teed to do absolutely nothing!  They have, however, in my exper-
  223.         ience performed essentially as described herein.  The author
  224.         will not be responsible for any loss or damages caused through
  225.         the use of these programs.  No warranty, express or implied,
  226.         is provided for this software's performance, merchantability,
  227.         or fitness for a particular purpose.
  228.         
  229.            All trademarks are property of their respective owners.
  230.         
  231.            The programs and documentation are Copyright 1991,1992 by 
  232.         Chuck Steenburgh.  You are encouraged to distribute these pro-
  233.         grams provided the following conditions are met:
  234.         
  235.            - all files contained in the archive or distribution disk
  236.              must be distributed together in UNMODIFIED form
  237.         
  238.            - you charge no more than a reasonable fee for copying or
  239.              subscription, and clearly indicate that payment of such
  240.              a fee does NOT grant ownership of the programs.
  241.         
  242.            This program is part of set of utilities known as STEEN-
  243.         BURGH'S STUFF (Mildly Useful Utilities).  The full set of
  244.  
  245.                                      Page 4
  246.  
  247.  
  248.  
  249.  
  250.  
  251.         utilities includes the following programs:
  252.         
  253.              BATBOX:     Simple menu creation/input system
  254.              CHKPRN:     Checks parallel printer status
  255.              CLK:        Displays time on screen
  256.              CURSOR:     Change cursor shape
  257.              DOSVER:     Checks for DOS version currently running
  258.              INPUT:      Simple prompt/input system
  259.              KLS:        Colorful screen-clearing utility
  260.              LAUNCHER:   File selection/execution system
  261.              MUSIC:      Plays transcribed sheet music on the PC
  262.              RAND:       Random number generator
  263.              SKIP:       Prints blank lines from batch files
  264.              SOUNDER:    Wide range of noise making options
  265.              SPACE:      File/disk space reporting utility
  266.              WAITFOR:    Timed pauses 
  267.              WHENISIT:   Date/time telling utility
  268.              WRITE:      Colorful output anywhere on screen
  269.              XD:         Create/switch directories at the same time
  270.         
  271.            You may evaluate these programs for up to 30 days on a free
  272.         trial basis.  After 30 days, you should register your use of
  273.         these programs.  The registration fee is $20, payable to the
  274.         author at the address given below.  For those registering
  275.         directly with Tay-Jee Software, we offer a $5 cash discount.
  276.         
  277.            Let's be real: I don't plan to make a lot of money this way.
  278.         Registration does have its advantages:
  279.         
  280.            - I am improving these programs all the time.  Registration
  281.              will get you IMMEDIATELY a disk with the latest version.
  282.              You will also get the next major release of the program set
  283.              sent to you free of charge.
  284.         
  285.            - While I can't promise to include everyone's suggestions
  286.              in program updates, you can bet I'll listen to registered
  287.              users before any of you scrounges out there.
  288.         
  289.            - You will make me feel all warm and fuzzy and appreciated, 
  290.              and all that good stuff.
  291.         
  292.            - You will also get an evaluation copy of my text file for-
  293.              matting program (used to produce the margins in this doc-
  294.              ument), and any other electronic creations I have decided
  295.              to unleash on a foolish, unsuspecting world.
  296.         
  297.            Send comments/registrations to:
  298.         
  299.                 Tay-Jee Software
  300.                 Post Office Box 835
  301.                 Lexington, VA 24450
  302.                 (703)464-5290
  303.                 
  304.                 !!!VIRGINIA RESIDENTS ADD 4.5SALES TAX!!!
  305.  
  306.                                      Page 5
  307.  
  308.  
  309.  
  310.  
  311.  
  312.         
  313.                 CIS 72330,1776 (I haunt the IBMSYS and IBMPRO forums)
  314.         
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.                                      Page 6